package com.cafuc.test;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException;

/**
 * @author gaoqiang
 * @create 2020-07-29 13:11
 */
public class ImageUtil {
    public static BufferedImage readImg(String path){
        BufferedImage image = null;
        try {
            image = ImageIO.read(ImageUtil.class.getResource(path));
        } catch (IOException e) {
            e.printStackTrace();
        }
        return image;
    }
}
